This package has never compiled, and nothing here ever asked it to - #1
Merged
Conversation
Nothing here has ever run zig build. That is the gap that hid sixteen defects in gHashTag/zig-golden-float and five in gHashTag/zig-hdc: a package can look maintained, be imported by name, and not compile for anybody, because nothing ever asked it to. Pinned to 0.15.2, the version the packages that would consume it are built with. This commit does not claim the build passes -- it makes the answer visible.
…e root build.zig declared pub fn test, and test is a keyword. It also assigned b.standardTargetOptions without calling it, passed two arguments to installArtifact, and read b.step as a field. None of that is a version difference: it is a sketch shaped like a build script, and nothing here ever ran it because no workflow built anything. The manifest was equally unusable -- a string where 0.15 requires an enum literal, and no fingerprint -- so this package could not be depended on by anything either. src/root.zig now has a test target and refAllDeclsRecursive. It is the surface a consumer gets and it was the one surface never compiled.
src/root.zig re-exported everything as 'pub use module.{ A, B as C };'. Zig has
no use statement and no as aliasing, so this file -- the surface every consumer
imports -- has never been valid Zig, and this package has therefore never been
usable by anybody.
Five such blocks, now sixty-seven pub const declarations with the aliases
preserved exactly as they were spelled.
Nothing reported this in the lifetime of the repository, for the same reason
nothing reported the build script that declared 'pub fn test': there was no
workflow that built anything, so the question was never asked.
…ectory Same shape as gHashTag/zig-golden-float#95, and the same shape as root.zig: a file inside src/ writing @import("src/simd_config.zig") asks for src/src/simd_config.zig. The target is one level above where the import looked.
The Rust-style blocks listed VEC_F32_SIZE, DEFAULT_SYNC_INTERVAL, DEFAULT_QUANTIZE_THRESHOLD, TRIT_NEG, TRIT_ZERO and TRIT_POS. None of those is exported by the module it was taken from. Nothing could ever have used them, because the file naming them has never compiled -- so they are dropped rather than invented. simd_config used std.io.getStdOut, removed in 0.15. A File writer borrows a buffer the caller owns, so the buffer lives at the call site now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This repository had no workflow that built anything, and six separate things were wrong. Each one alone makes the package unusable; none of them was known, because nothing ever asked.
build.zig.zon: name as a string, nofingerprintbuild.zig:pub fn test(...)testis a keyword. This file has never compiledb.standardTargetOptionsnever called, two args toinstallArtifact,b.stepread as a fieldsrc/root.zig:pub use module.{ A, B as C };useand noas— the module root has never been valid Zig"src/x.zig"from insidesrc/src/src/x.zig— same shape as gHashTag/zig-golden-float#95std.io.getStdOutFive
pub useblocks became 67pub constre-exports, aliases preserved exactly as spelled. The module root now has a test target andrefAllDeclsRecursive, so the surface a consumer gets is the surface that gets compiled.CI is green:
zig buildandzig build testboth pass on 0.15.2, for the first time in this repository's life.This is the third package in a row where the absence of a build workflow hid the fact that it could not be used at all — after gHashTag/zig-golden-float#97 (16 defects, three Zig versions in one package) and gHashTag/zig-hdc#3 (five drift errors behind a green badge).